# $LastChangedDate: 2010-05-25 21:26:05 -0400 (Tue, 25 May 2010) $
# LEGAL: COPYRIGHT (C) 2010 JIM E. BROOKS WWW.PALOMINO3D.ORG
# Find OSSIM.
# OSSIM_INC_DIR
# OSSIM_LIBS
#-------------------------------------------------------------------------------

INCLUDE( CMakeModules/inc_find.cmake )

#-------------------------------------------------------------------------------
# Find include directory : OSSIM_INC_DIR

FIND_PATH( OSSIM_INC_DIR
    NAMES ossim/ossimVersion.h
    PATHS ${POSSIBLE_INC_DIRS}
)

#-------------------------------------------------------------------------------
# Find libraries : OSSIM_LIBS

FIND_LIBRARY( OSSIM_LIBS
    NAMES ossim
    PATHS ${POSSIBLE_LIB_DIRS}
)

#-------------------------------------------------------------------------------
# Found everything?

IF( OSSIM_INC_DIR AND OSSIM_LIBS )
    SET( OSSIM_FOUND "TRUE" )
    MESSAGE( STATUS "Found OSSIM: ${OSSIM_LIBS}" )
ELSE()
    IF( OSSIM_FIND_REQUIRED )
        MESSAGE( FATAL_ERROR "Could not find OSSIM" )
    ENDIF()
ENDIF()
